#ifndef _CLOSUREFUNCTION_HPP
#define _CLOSUREFUNCTION_HPP

#include "Object.hpp"
#include "Type.hpp"
#include "FunctionInstruction.hpp"

using namespace std;

namespace object {
	class ClosureFunction : public Object {
	public:
		ClosureFunction(FunctionInstruction* fn) 
			: _fn(fn) {
		}

		virtual string Type() override {
			return CLOSURE_FUNCTION;
		}

		virtual string examine() override {
			return "CLOSURE_FUNCTION";
		}

		FunctionInstruction* getFn() const { return _fn; }

	private:
		FunctionInstruction* _fn{ nullptr };
	};
}

#endif // !_CLOSUREFUNCTION_HPP
